-- GENERATED SPELL FOR [Sparktouched Warrior] --


function spell0_28111(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(18501,pUnit)
pUnit:RegisterEvent('Sorts_28111', 5321, 1)
end

function spell1_28111(pUnit, Event) --@Lightning Whirl,n/a--
pUnit:FullCastSpellOnTarget(54429,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28111', 548, 1)
end

function spell2_28111(pUnit, Event) --@Vicious Roar,Self--
pUnit:FullCastSpellOnTarget(52974,pUnit)
pUnit:RegisterEvent('Sorts_28111', 15304, 1)
end

function Sorts_28111(pUnit, Event)
local choix_sorts_28111 = math.random(0, 2)
if choix_sorts_28111 == 0 then
pUnit:RegisterEvent('spell0_28111', 1, 1)
end
if choix_sorts_28111 == 1 then
pUnit:RegisterEvent('spell1_28111', 1, 1)
end
if choix_sorts_28111 == 2 then
pUnit:RegisterEvent('spell2_28111', 1, 1)
end
end

function mob28111_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28111', math.random(1500, 3000), 1)
end

function mob28111_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28111_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28111_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28111, 1, 'mob28111_Action')
RegisterUnitEvent(28111, 2, 'mob28111_Leave')
RegisterUnitEvent(28111, 3, 'mob28111_Kill')
RegisterUnitEvent(28111, 4, 'mob28111_Die')
